import Sprite from '../../utils/canvas/sprite.js';
import * as Painter from '../../utils/canvas/painter.js';
 
export const bg = new Sprite("背景",Painter.bgPainter,[]);


//画布参数
const res = wx.getSystemInfoSync();// 获取设备当前属性
const canvasW = Math.round(1200);  //设置画布宽度
const canvasH = Math.round(800);  //设置画布高度
const cxt_bg = 350; //画布背景图宽度
const bg_w = Math.round(canvasW * .4); // 卡片宽度
let left = Math.round(canvasW / 2) - Math.round(bg_w / 2);


//背景属性设置
bg.setAttr({
	left :left,
	top:10,
	width:bg_w,
	pixelRatio :res.pixelRatio,
	height: canvasH
});